home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / misc / emu / p-interp.lha / p-interp-0.4 / Makefile < prev    next >
Makefile  |  2001-06-06  |  4KB  |  151 lines

  1. # P-Code interpreter (to run the apple pascal system)
  2. # Copyright (C) 2000 Mario Klebsch
  3. #
  4. # $Id: Makefile,v 1.11 2001/06/06 23:14:19 mario Exp $
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19. #
  20. #
  21. # $Log: Makefile,v $
  22. # Revision 1.11  2001/06/06 23:14:19  mario
  23. # Turtlegraphics wird jetzt mit einem #define aktiviert
  24. #
  25. # Revision 1.10  2001/05/27 16:21:48  mario
  26. # - Neue Kommandozeilenoption zum Tracen einer einzigen Prozedur
  27. #
  28. # - Auch beim Disassemblieren  von Segment 0 werden jetzt die
  29. #   korrekten Prozedurnamen angezeigt.
  30. #
  31. # Revision 1.9  2001/05/26 16:51:55  mario
  32. # Optimierung beim Compiler aktiviert.
  33. #
  34. # Revision 1.8  2001/05/26 15:13:29  mario
  35. # Diverse kleine Fehler behoben, fehlende #includes, Labels ohne Statement
  36. # dahinter, ...
  37. #
  38. # Revision 1.7  2001/05/23 21:32:57  mario
  39. # kleinere Änderungen an den Regeln
  40. #
  41. # Revision 1.6  2001/05/23 21:16:41  mario
  42. # Turtlegraphics wurde als eigener Prozess ausgelagert.
  43. #
  44. # Revision 1.5  2001/05/20 20:35:22  mario
  45. # svolio ruft die Disk-I/O-Routinen jetzt direkt auf.
  46. #
  47. # Revision 1.4  2001/05/20 20:14:40  mario
  48. # Neues Gerät PRINTER: implementiert
  49. #
  50. # Revision 1.3  2001/05/20 13:47:56  mario
  51. # Alternative Quellen für das Image eingetragen
  52. #
  53. # Revision 1.2  2001/05/20 13:12:02  mario
  54. # CVS-Idents und Logs eingefügt
  55. #
  56. #
  57.  
  58. PREFIX=/usr/local
  59.  
  60. SRCS=interpreter.c Memory.c Stack.c Sets.c Array.c native6502.c \
  61.     UnitIo.c Term.c Diskio.c Printer.c Search.c turtlegr.c ptrace.c
  62. OBJS=$(SRCS:%.c=%.o)
  63.  
  64. X11=/opt/X11
  65.  
  66. X11_INCLUDE=$(X11)/include
  67. X11_LIB=$(X11)/lib
  68.  
  69. #DEFINES=-DAPPLE_1_3
  70. DEFINES=-DTURTLEGRAPHICS
  71.  
  72. #IMAGES=ftp://ftp.apple.asimov.net/pub/apple_II/images/utility/programming/apple_pascal
  73. #IMAGES=ftp://ftp.calvacom.fr/pub/apple_II/images/utility/programming/apple_pascal
  74. IMAGES=ftp://ftp.mayn.de/pub/mirrors/apple.asimov.net/programming/apple_pascal
  75.  
  76. INCLUDES=-I$(X11_INCLUDE)
  77. CFLAGS=-Wall -g $(INCLUDES) $(DEFINES) # -O3 # -Dinline= -pedantic
  78.  
  79. MAKEDEPEND=gccmakedep
  80.  
  81. BINS=ucsd svolio svolcvt xturtleserver
  82. all: $(BINS)
  83.  
  84. install: all
  85.     cp $(BINS) $(PREFIX)/bin/.
  86.     cp ucsd.1 svolio.1 svolcvt.1 $(PREFIX)/man/man1/.
  87.  
  88. Bin2C: Bin2C.c
  89.     $(CC) $(CFLAGS) -o $@ $<
  90.  
  91. svolcvt: svolcvt.c
  92.     $(CC) $(CFLAGS) -o $@ $<
  93.  
  94. system.charset.h: system.charset Bin2C
  95.     (echo '/* WARNING: this file is not GPLed, do not redistribute */';\
  96.     ./Bin2C system.charset )>system.charset.h
  97.  
  98. turtlegr.o: system.charset.h
  99.  
  100. xturtleserver: xturtleserver.c
  101.     $(CC) -o $@ -g xturtleserver.c -I$(X11_INCLUDE) -L$(X11_LIB) -R$(X11_LIB) -lXt -lX11 -lm
  102.  
  103. ucsd: $(OBJS)
  104.     $(CC) -o $@ $(OBJS) -lncurses_g -lm
  105.  
  106. svolio: svolio.o Diskio.o Memory.o
  107.     $(CC) -o $@ $+ -lcurses
  108.  
  109. depend: 
  110.     $(MAKEDEPEND) -DMAKEDEPEND $(INCLUDES) $(DEFINES) $(SRCS) svolio.c svolcvt.c xturtleserver.c
  111.  
  112. clean:
  113.     -rm -f *.o system.charset.h *.tmp *~ TAGS tags *.bak ucsd.core
  114.  
  115. distclean: clean
  116.     -rm -f $(BINS) Bin2C system.charset apple_pascal_*.dsk \
  117.     work.svol system.svol
  118.     touch tmp.c
  119.     $(MAKEDEPEND) tmp.c
  120.     -rm -f tmp.c
  121.  
  122. system.charset: apple_pascal_1.dsk svolio
  123.     ./svolio apple_pascal_1.dsk $@ > $@.tmp 
  124.     mv $@.tmp $@
  125.  
  126. apple_pascal: apple_pascal_0.dsk apple_pascal_1.dsk \
  127.     apple_pascal_2.dsk apple_pascal_3.dsk
  128.  
  129. apple_pascal_0.dsk:
  130.     ncftpget $(IMAGES)/$@.gz
  131.     gzip -d $@.gz
  132.  
  133. apple_pascal_1.dsk:
  134.     ncftpget $(IMAGES)/$@.gz
  135.     gzip -d $@.gz
  136.  
  137. apple_pascal_2.dsk:
  138.     ncftpget $(IMAGES)/$@.gz
  139.     gzip -d $@.gz
  140.  
  141. apple_pascal_3.dsk:
  142.     ncftpget $(IMAGES)/$@.gz
  143.     gzip -d $@.gz
  144.  
  145. work.svol system.svol: buildimages.sh ucsd apple_pascal_1.dsk \
  146.     apple_pascal_2.dsk apple_pascal_3.dsk
  147.     sh buildimages.sh
  148.  
  149. # DO NOT DELETE
  150. tmp.o: tmp.c
  151.